package com.lzx.iteam.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.lzx.iteam.R;
import com.lzx.iteam.bean.SalaryGroupBean;

import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * **********************************
 * User: zhangshuai
 * Date: 2017年 01月 10日
 * Time: 下午7:01
 *
 * @QQ : 1234567890
 * **********************************
 */
public class SalaryGroupAdapter extends BaseAdapter {

    private Context mContext;
    private int mType;
    private ArrayList<SalaryGroupBean> mDatas;

    public SalaryGroupAdapter(Context mContext, ArrayList<SalaryGroupBean> mDatas) {
        this.mContext = mContext;
        this.mDatas = mDatas;
    }

    @Override
    public int getCount() {
        return mDatas.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        convertView = LayoutInflater.from(mContext).inflate(R.layout.attendance_team_list_item_layout,null);
        TextView content = (TextView) convertView.findViewById(R.id.tv_attendance_team_list_item_text);
        if (mType == 0){
            SalaryGroupBean bean = mDatas.get(position);
            content.setText(bean.getGroup_name());
        }
        return convertView;
    }
}
